<html>
<body>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
var style_in_responseXML = async_test("Check that a style in an XHR's responseXML doesn't prevent accessing the responseXML");

var request = new XMLHttpRequest();
request.responseType = "document";
request.open("GET", "resources/xml-with-style-tag.xml", true);
request.onreadystatechange = style_in_responseXML.step_func(function() {
  if (request.readyState === 4) {
    assert_not_equals(null, request.response);
    assert_not_equals(null, request.responseXML);
    style_in_responseXML.done();
  }
});
request.send();
</script>
</body>
</html>
